// import req from "../req";
// import service from '@/utils/request'
import request from '@/utils/request-java'
// import tool from '@/utils/tool';
// 获取用户列表
export function UserList() {
	var a = {
		page: 1,
		limit: 99999
	}
	return request({
		url: `/OaAdminController/list`,
		method: 'get',
		params: a
	});
}

export function UserAdd(data) {
	// var a = {
	// 	client_id: 1,
	// 	api_token: req('Admin/Add'),
	// 	token: tool.data.get("TOKEN")
	// }
	// console.log(a);
	return request({
		url: `/OaAdminController/add`,
		method: 'post',
		params: data
	});
}

// 获取角色列表   
export function RoleList() {
	var a = {
		page: 1,
		limit: 99999
	}
	// console.log(a);
	return request({
		url: `/OaRoleController/list`,
		method: 'get',
		params: a
	});
}

//   编辑用户
export function EditUser(data) {
	return request({
		url: `/OaAdminController/updateVisible`,
		method: 'put',
		data: data
	});
}

// 获取项目列表
export function ProjectList() {
	var a = {
		page: 1,
		limit: 99999
	}
	return request({
		url: `/OaProjectController/list`,
		method: 'get',
		params: a
	});
}


//   查看详情
export function Details(data) {
	var a = {
		page: 1,
		limit: 10
	}
	console.log(a);
	return request({
		url: `/OaAdminController/list`,
		method: 'get',
		params: { ...data, ...a }
	});
}

//   绑定项目
export function BindProject(data) {
	return request({
		url: `/OaAdminController/updateVisible`,
		method: 'put',
		data: data
	});
}

// 批量删除
export function Deletes(data) {
	return request({
		url: `/OaAdminController/remove`,
		method: 'delete',
		params: data
	});
}


//   修改用户状态
export function Status(data) {
	return request({
		url: `/OaAdminController/updateVisible`,
		method: 'put',
		data: data
	});
}


